import Base from './base'

class User extends Base {

  static isSuperAdmin: () => boolean
  static $logout: () => any

  username: string | undefined
  superAdmin: boolean
  superAdminName: string | undefined
  loginName: string | undefined
  account: any
  accountId: string | undefined
  authoriseList: string[] | undefined
  birthday: string | undefined
  businessEmails: string[] | undefined
  countryId: string | undefined
  countryName: string | undefined
  dateCreate: string | undefined
  givenName: string | undefined
  groupId: string | undefined
  hireDate: string | undefined
  mainAccountId: string | undefined
  photo: string | undefined
  realName: string | undefined
  roles: [] | undefined

  constructor() {
    super()
    this.username = undefined
    this.superAdmin = false
    this.superAdminName = undefined
    this.loginName = undefined
    this.account = undefined
    this.accountId = undefined
    this.authoriseList = undefined
    this.birthday = undefined
    this.businessEmails = undefined
    this.countryId = undefined
    this.countryName = undefined
    this.dateCreate = undefined
    this.givenName = undefined
    this.groupId = undefined
    this.hireDate = undefined
    this.mainAccountId = undefined
    this.photo = undefined
    this.realName = undefined
    this.roles = undefined
  }

  isSuperAdmin() {
    return !!this.superAdmin
  }

  $logout() {
    return null
  }
}

User.modelName = 'User'

export default User
